#import <Foundation/Foundation.h>


@protocol FLDRadioGroupDelegate;


@interface FLDRadioGroup : NSObject {
	id<FLDRadioGroupDelegate> delegate;
	NSMutableArray *buttons;
	UIButton *selectedButton;
}


@property (assign, nonatomic) id <FLDRadioGroupDelegate> delegate;
@property (assign) NSInteger selectedIndex;
@property (retain) UIButton *selectedButton;


-(void)addButton:(UIButton*)button;
-(void)removeButton:(UIButton*)button;
-(void)removeAllButtons;

-(NSInteger)selectedIndex;
-(void)setSelectedIndex:(NSInteger)index;

-(UIButton*)selectedButton;
-(void)setSelectedButton:(UIButton*)button;

@end


@protocol FLDRadioGroupDelegate
@required
-(void)radioGroup:(FLDRadioGroup*)radioGroup didSelecteButton:(UIButton*)button atIndex:(NSInteger)index;
@end
